﻿// <copyright file="IWidgetConfigRepository.cs" company="IMIP">
// Copyright (c) 2010 IMIP. All Right Reserved.
// </copyright>
// <author>Huydq</author>
// <email>quanghuyqn@gmail.com</email>
// <date>14-Oct-09</date>
// <summary>Implement method to get config data from xml file. </summary>

using System;
using Cooking.WidgetController.Configs;
using Microsoft.Practices.EnterpriseLibrary.Caching;

namespace CommerceOne.Common.Configs
{
    /// <summary>
    /// Tien 19-May: Add GetConfigData(string configName, Type configType, bool useCache).
    /// </summary>
    public interface IWidgetConfigRepository
    {
        IWidgetConfig GetConfigData(string configName, Type configType);

        // Tien 19-May: This new method is added to keep current implementation as is, only code in production tool module,
        // where doesn't use cache is changed to support new parameter.
        IWidgetConfig GetConfigData(string configName, Type configType, bool useCache);

        IWidgetConfig GetConfigData(string configName, Type configType, ICacheItemExpiration expiration);

        void SetConfigData(string configName, IWidgetConfig configObject, Type configType);

        ICacheItemExpiration CacheExpiration { get; set; }
    }
}